package tuvienna.jade;

import jade.core.Agent;
import jade.wrapper.StaleProxyException;

import java.io.File;
import java.io.FileInputStream;
import java.util.ArrayList;
import java.util.List;

/**
 * Meta-Agent who will set up the other agents
 * This one will set up a vary easy setting
 * 
 */
public class DummySetupAgent extends SetupAgent{
		
			
	private static final long serialVersionUID = 5207800524323008854L;
	
	protected void setup() {
		
		String[] interestsA = { "A" };
		String[] interestsB = { "B" };
		String[] interestsC = { "C" };


		try {
			String[] eArgs = {"-evaluationIntervall","2000"};
			createNewAgent("Evaluator", "tuvienna.jade.EvaluatorAgent",eArgs);
			
			String[] tArgs  = {"-discussionTickerTime","4000","-gui","true"};
			createNewAgent("Table1", "tuvienna.jade.table.TableAgent",tArgs);
			createNewAgent("Table2", "tuvienna.jade.table.TableAgent",tArgs);
			createNewAgent("Table3", "tuvienna.jade.table.TableAgent",tArgs);
			
			String[] args  = {"-oldAgeForTable","35","-verbose","false"};
					
			for (int i=0; i<5; i++) {
				createNewAgent("A"+i, "tuvienna.jade.participant.DynamicParticipantAgent",mergeArgs(args,interestsA));
				createNewAgent("B"+i, "tuvienna.jade.participant.DynamicParticipantAgent",mergeArgs(args,interestsB));
				createNewAgent("C"+i, "tuvienna.jade.participant.DynamicParticipantAgent",mergeArgs(args,interestsC));
			}

			this.doDelete();
			System.out.println("Setup complete");
		} catch (StaleProxyException e) {
			e.printStackTrace();
		} catch (InterruptedException e) {
			e.printStackTrace();
		}			
	}


}
